/**
 * Created by hooxin on 17-7-6.
 */
Ext.define('YBB.view.center.Center', {
    extend: 'Ext.NavigationView',

    requires: [
        'YBB.view.center.CenterController'
    ],

    /*
     Uncomment to give this component an xtype
     xtype: 'center',
     */
    xtype: 'mycenter',
    controller: 'center',

    // navigationBar: {
    //     title: '个人',
    //     items: [
    //         {
    //             xtype: 'button',
    //             text: '测试'
    //         }
    //     ]
    // },
    fullscreen: true,
    defaultBackButtonText: '返回',
    useTitleForBackButtonText: true,
    items: [
        {
            title: '个人中心',
            header: false,
            xtype: 'formpanel',
            layout: {
                type: 'vbox',
                align: 'stretch'
            },
            items: [
                {
                    xtype: 'panel',
                    height: '11em',
                    layout: {
                        type: 'vbox',
                        align: 'center',

                    },
                    bodyPadding: 15,
                    defaults: {
                        margin: '2 2 2 2',
                        flex: 1,
                        xtype: 'panel'
                    },
                    items: [
                        {
                            xtype: 'img',
                            cls: 'x-fa fa-user-circle-o',
                            style: 'fontSize:5em',
                            width: '1em',
                            height: '1.3em',
                            flex: 0
                        },
                        {
                            html: '{nickName} / {mobilePhone}',

                        },
                        {
                            html: '当前积分：{currentIntegral}'
                        }
                    ]
                },
                {
                    xtype: 'panel',
                    defaults: {
                        xtype: 'button',
                        flex: 1,
                        width: '4em',
                        height: '4em',
                        iconAlign: 'top',
                        style: 'fontSize:1.1em'
                    },
                    bodyPadding: 5,
                    layout: {
                        type: 'hbox',
                        align: 'stretch'
                    },
                    items: [
                        {
                            text: '我的订单',
                            iconCls: 'x-fa fa-file-text-o',
                            handler: 'onOrderBtnClick'
                        },
                        {
                            text: '我的车辆',
                            iconCls: 'x-fa fa-car',
                            handler: 'onCarBtnClick'
                        },
                        {
                            text: '优惠券',
                            iconCls: 'x-fa fa-ticket',
                            handler: 'onTicketBtnClick'
                        }
                    ]
                }
            ]
        }
        /* include child components here */

    ]
});